package com.jae.model;

/**
 * 鉴权错误码
 */
public enum ResultCode {
    CLIENT_AUTHENTICATION_FAIL(1001,"客户端认证失败"),
    USERNAME_OR_PASSWORD_ERROR(1002,"用户名或密码错误"),
    NO_PERMISSION(403,"权限不足"),
    UNSUPPORTED_GRANT_TYPE(1003,"不支持的认证方式"),
    TOKEN_INVALID(402,"token失效"),

    NO_TOKEN(1004,"未携带token，无权访问"),
    UN_AUTHENTICATION(401,"未授权");

    private int code;
    private String message;

    private ResultCode(int code, String message){
        this.code = code;
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public int getCode() {
        return code;
    }
}
